package com.study.bookstore.repository;

import com.study.bookstore.domain.ShoppingCart;
import org.springframework.stereotype.Repository;

import org.springframework.data.jpa.repository.*;
import org.springframework.transaction.annotation.Transactional;

import java.beans.Transient;
import java.util.List;


/**
 * Spring Data JPA repository for the ShoppingCart entity.
 */
@SuppressWarnings("unused")
@Repository
public interface ShoppingCartRepository extends JpaRepository<ShoppingCart, Long> {
    List<ShoppingCart> findShoppingCartsByUserId(Integer userId);

    @Transactional
    void deleteByUserId(Integer userid);
}
